﻿using System;

namespace Abp.Net.Sms
{
    /// <summary>
    /// Sms Message
    /// </summary>
    public class SmsMessage
    {
        /// <summary>
        ///  Sms Message
        /// </summary>
        /// <param name="to"></param>
        /// <param name="templateCode"></param>
        /// <param name="templateParams"></param>
        /// <param name="freeSignName"></param>
        /// <param name="sendTime"></param>
        public SmsMessage(string to, string templateCode, object[] templateParams, string freeSignName = "", DateTime? sendTime = null)
        {
            To = to;
            TemplateCode = templateCode;
            TemplateParams = templateParams;
            FreeSignName = freeSignName;
            SendTime = sendTime;
        }

        /// <summary>
        /// Receiver (多个手机号用英文逗号,隔开)
        /// </summary>
        public string To { get; set; }

        /// <summary>
        /// 模板内容（如：{0}，xxxxx{1},yyyy{2}）
        /// </summary>
        public string TemplateCode { get; set; }

        /// <summary>
        /// 模板参数数组，总数量对应TemplateCode中的占位符
        /// </summary>
        public object[] TemplateParams { get; set; }

        /// <summary>
        /// 签名：没有则读取默认配置的签名
        /// </summary>
        public string FreeSignName { get; set; }

        /// <summary>
        /// 定时发送时间:可选,没有或者小于当前时间则立即发送
        /// </summary>
        public DateTime? SendTime { get; set; }
    }
}
